package com.chushouya.order.constants;



import com.general.framework.core.enums.IEnum;
import com.general.framework.core.lang.Strings;

import java.util.Objects;

/**
 * 业务员操作按钮类型(1:可操作 action 2:btn 底部按钮3:悬浮按钮 fix)
 */
public enum ClerkActionTypeEnum implements IEnum<String> {

    ACTION("action", "可操作按钮"),
    BTN("btn", "底部按钮"),
    FIX("fix", "悬浮按钮");

    private String value;

    private String desc;

    ClerkActionTypeEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static String getDesc(String value) {
        for (ClerkActionTypeEnum thisEnum : ClerkActionTypeEnum.values()) {
            if (Objects.equals(thisEnum.value, value)) {
                return thisEnum.desc;
            }
        }
        return Strings.EMPTY;
    }

    @Override
    public String value() {
        return this.value;
    }

    @Override
    public String named() {
        return this.desc;
    }
}
